//
//  LoginDTO.swift
//  hello
//
//  Created by yafei li on 2025/9/17.
//

import Fluent
import Vapor

// 用户注册请求DTO
struct RegisterDTO: Content {
    var phone: String?
    var password: String?
}
// 用户登录请求DTO
struct LoginDTO: Content {
    var phone: String?
    var password: String?
}

// 用户登录响应DTO
struct LoginResponseDTO: Content {
    var token: String
}

// 用户ID请求DTO
struct UserIDDTO: Content {
    var userId: StringCodable?
}

// 设置密码请求DTO
struct ConfigPwdDTO: Content {
    var userId: StringCodable?
    var password: String?
}

// 刷新令牌请求DTO
struct RefreshRequestDTO: Content {
    let refreshToken: String?
}
// 刷新令牌响应DTO
struct TokenResponseDTO: Content {
    let accessToken: String  // JWT
    let refreshToken: String // Refresh Token
    let expiresInSeconds: TimeInterval
}



